<template>
  <a-popconfirm
    :title="title"
    okText="确 定"
    cancelText="取 消"
    @confirm="$emit('confirm')"
  >
    <a-icon slot="icon" :type="icon" style="color: red" />
    <slot />
  </a-popconfirm>
</template>

<script>
export default {
  name: "Popconfirm",
  props: {
    icon: {
      type: String,
      default: "question-circle-o",
    },
    title: {
      type: String,
      default: "确定要删除吗 ？",
    },
  },
};
</script>

<style>
</style>